package com.common;

import freemarker.template.TemplateMethodModelEx;
import freemarker.template.TemplateModelException;

import java.sql.JDBCType;
import java.util.List;

/**
 * freemark自定义函数 实现下划线转驼峰 UnderlineCase
 */
public class FMgetJdbcType implements TemplateMethodModelEx {

    @Override
    public Object exec(List list) throws TemplateModelException {
        String jdbcType = list.get(0).toString();
        return JDBCType.valueOf(Integer.parseInt(jdbcType));
    }
}
